public class lx_9_0930 {
    public static String myToString(int[] arr) {
        String ret = "[";
        for (int i = 0; i <arr.length; i++) {
            if(i== arr.length-1) {
                ret+=arr[i];
                break;
            }
            ret += arr[i] + ",";
        }
        ret += "]";
        return ret;
    }
    public static void main(String[] args) {
        int [] arr={2,34,1,9,55,8};
        System.out.println(myToString(arr)); 
    }
}
